/*
 * @Author: your name
 * @Date: 2021-12-13 23:35:42
 * @LastEditTime: 2021-12-13 23:45:19
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \code\Plugins_For_ES5\src\demo-plugin-property-mutators\build.js
 */
const babelCore = require('@babel/core')

const code = `
    var foo = {
      get bar() {
        return this._bar;
      },
      set bar(value) {
        this._bar = value;
      },
    };
`

const result = babelCore.transformSync(code, { plugins: ["@babel/plugin-transform-property-mutators"]})

console.log(result.code);